Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement rules for CIS OCP Section 5.5 #10787

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

rhmdnd
Copy link
Collaborator

@rhmdnd rhmdnd commented Jun 30, 2023

Now that we have a profile and control files for CIS 1.4.0, we can start
wiring up the existing rules.

This commit ports all the existing rules we were using for the CIS
OpenShift profile into the CIS 1.4.0 version.

@rhmdnd rhmdnd added OpenShift OpenShift product related. CIS CIS Benchmark related. labels Jun 30, 2023
@github-actions
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

Copy link
Collaborator

@jhrozek jhrozek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q. about the rule selection

rules: []
status: partial
rules:
- general_configure_imagepolicywebhook
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule needs some work, so the partial status is correct. But, shouldn't we keep notes or links to cards in that case?
Additionally, I wonder if the rules ocp_allowed_registries, ocp_allowed_registries_for_import, ocp_insecure_registries could be used here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think those rules are relevant, but they will fail by default, and we don't have a remediation for it, wondering if this might be too strict to add here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with the rules failing by default since that's inline with what's documented in the benchmark (we say that image provenance is not setup by default, and we provide links to users to help them configure image registries).

That approach here seems reasonable since it's highlighting a legitimate finding for users.

@Vincent056
Copy link
Contributor

merging conflicts

@rhmdnd rhmdnd force-pushed the implement-cis-ocp-5-5 branch 2 times, most recently from 18c9821 to ee1e203 Compare July 13, 2023 19:55
Now that we have a profile and control files for CIS 1.4.0, we can start
wiring up the existing rules.

This commit ports all the existing rules we were using for the CIS
OpenShift profile into the CIS 1.4.0 version.
@yuumasato
Copy link
Member

/test e2e-aws-ocp4-cis
/test e2e-aws-ocp4-cis-node

@yuumasato yuumasato self-assigned this Jul 14, 2023
Copy link
Member

@yuumasato yuumasato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just pending CI

@codeclimate
Copy link

codeclimate bot commented Jul 14, 2023

Code Climate has analyzed commit afa2bfa and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 53.4% (0.0% change).

View more on Code Climate.

@rhmdnd rhmdnd merged commit 59fb3ad into ComplianceAsCode:master Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CIS CIS Benchmark related. OpenShift OpenShift product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants